import time

def Bubble_sort(nums):
    a = True
    while a:
        a = false
        for i in range(len(nums) -1):
            if nums[i] > nums[i + 1]:
                nums[i], nums[i + 1] = nums [i+1], nums[i]
                a = True
def read2list(filename):
    file = open(filename,'r')
    data = file.readlines()
    return data

b1= read2list("b1_sorted.txt")
b2= read2list("b2_reverse.txt")
b3= read2list("b3_shuffle.txt")

t_start = time.time()
Bubble_sort(Z)
t_finish=time.time()
print("Время", round((t_finish-t_start)*1000))

t_start = time.time()
Bubble_sort(Z)
t_finish=time.time()
print("Время", round((t_finish-t_start)*1000))

t_start = time.time()
Bubble_sort(Z)
t_finish=time.time()
print("Время", round((t_finish-t_start)*1000))
